﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/ConvergenceTheme.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<elfam.web.ViewModels.Income.IncomeListItemViewModel>>" %>
<%@ Import Namespace="elfam.web.Extensions" %>
<%@ Import Namespace="elfam.web.ViewModels.Income" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Приходы
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<script language="javascript" type="text/javascript">
    
    $(document).ready(function() { $('.box-table-b tr:odd').addClass('alt'); })

</script>

    <h2>Приходы</h2>
    
    <table class="box-table-b">
        <tr>
            <th>Картинка</th>
            <th>Товар</th>
            <th>Артикул</th>
            <th>Кол-во текущее</th>
            <th>Кол-во начальное</th>
            <th>Дата</th>
            <th>Цена закупки</th>
        </tr>
    
    <% foreach (IncomeListItemViewModel item in Model) {%>
  
    <tr>
        <td><%= Html.ProductImage(item.Product) %></td>
        <td><a href="/Product/Details/<%= item.ProductId %>"><%= item.ProductName %> (id=<%= item.ProductId %>)</a></td>
        <td><%= item.SKU %></td>
        <td><%= item.QuantityCurrent %></td>
        <td><%= item.QuantityInitial %></td>
        <td><%= item.Date.ToShortDateString() %></td>
        <td><%= item.BuyPrice.ToCurrencyString() %></td>
    </tr>
    
    <% } %>
    
    </table>

</asp:Content>
